import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams} from 'ionic-angular';

// 引入tab
import { Tab1 } from './Tab1';
import { Tab2 } from './Tab2';

/**
 * Generated class for the TabTestPage page.
 *
 * See http://ionicframework.com/docs/components/#navigation for more info
 * on Ionic pages and navigation.
 */
@IonicPage()
@Component({
  selector: 'page-tab-test',
  templateUrl: 'tab-test.html',
})
export class TabTestPage {
      tabId: number;
      selectTabIndex:number;
       tab1 = Tab1;
       tab2 = Tab2;


  //   tab1Root = Page1;
  // tab2Root = Page2;
  // tab3Root = Page3;

  constructor(public navCtrl: NavController, public navParams: NavParams,public params: NavParams) {
        // this.tab1 = Tab1; //这个居然写在这个里面  
        // this.tab2 = Tab2;
         this.tabId = params.get("tabId");
          console.log(this.tabId);
    if(this.tabId != undefined || this.tabId !=null)
    {
      this.selectTabIndex = this.tabId;
    }
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad TabTestPage');
  }

}


// 

